package npap.cater.unr.edu.server.locator;

import com.google.web.bindery.requestfactory.shared.Locator;
import npap.cater.unr.edu.client.domain.Project;
import org.springframework.roo.addon.gwt.RooGwtLocator;
import org.springframework.stereotype.Component;

@RooGwtLocator("npap.cater.unr.edu.client.domain.Project")
@Component
public class ProjectLocator extends Locator<Project, Integer> {

    public Project create(Class<? extends npap.cater.unr.edu.client.domain.Project> clazz) {
        return new Project();
    }

    public Project find(Class<? extends npap.cater.unr.edu.client.domain.Project> clazz, Integer id) {
        return Project.findProject(id);
    }

    public Class<npap.cater.unr.edu.client.domain.Project> getDomainType() {
        return Project.class;
    }

    public Integer getId(Project project) {
        return project.getIdproject();
    }

    public Class<java.lang.Integer> getIdType() {
        return Integer.class;
    }

    public Object getVersion(Project project) {
        return project.getVersion();
    }
}
